package com.fyt.controller.dictionary;

import com.fyt.controller.utils.Code;
import com.fyt.controller.utils.Result;
import com.fyt.entity.Dictionary;
import com.fyt.mapper.DictionaryMapper;
import com.fyt.service.dictionary.DictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fyt
 * @since 2023-12-20
 */
@RestController
public class DictionaryController {
    @Autowired
    private DictionaryService dictionaryService;

    @PostMapping("/api/dictionary/getList")
    public Result getList(){
        List<Dictionary> list = dictionaryService.list(null);
        System.out.println(list);
        return new Result(list,Code.get_ok,null);
    }
}
